#pragma once // include once

#include <windows.h>
#include <D3D10.h>
#include <D3DX10.h>

// declare the D3D class object
class CD3D
{	
	private:

		D3D10_DRIVER_TYPE g_dx10DriverType;											// declare the driver type
		ID3D10Device* p_d3dDevice;													// D3D10 device declaration
		IDXGISwapChain* p_dx10swapChain;											// swap chain declaration	
		ID3D10RenderTargetView* p_RenderTargetView;									// render target view declaration
		ID3D10Buffer* p_vertexBuffer;										// pointer to the vertex buffer
		ID3D10Buffer* p_indexBuffer;	


	public:
		CD3D(void); //ctor
		~CD3D(void); // dtor

		ID3D10Device* getDevice() {return this->p_d3dDevice;};						// mutator function to expose the D3D10 device so it's available in all objects
		ID3D10RenderTargetView* getTargetView() {return this->p_RenderTargetView;}; // mutator function to expose the render target view variable

		HRESULT Initialize(HWND hWind);		// declaration of the 3D initialization process function
		void BeginScene(float red, float green, float blue, float alpha);
		void Draw();																// declaration of the drawing function in D3D
		void EndScene();
};

